package cn.tradewin.advisor.components;

import org.apache.tapestry5.BindingConstants;
import org.apache.tapestry5.ComponentResources;
import org.apache.tapestry5.annotations.Parameter;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.ioc.Messages;
import org.apache.tapestry5.ioc.annotations.Inject;

public class LayoutAssets {
	
	@Property
    @Parameter(required = true, defaultPrefix = BindingConstants.LITERAL)
    private String title;
	
	@Property
    private String pageName;
	
	@Inject
	private ComponentResources resources;
	
	@Inject
	private Messages messages;
	
	public String getNaviCss() {
		 return resources.getPageName().equalsIgnoreCase(pageName) ? "active" : null;
	}
	
	public String getNaviLabel() {
		return messages.get(pageName);
	}
	
	public String[] getChecklists() {
		return new String[] {"passets/checklist/CodingBoard", "passets/checklist/DetailDesignBoard"};
	}
}
